package com.lzj.admin.service;

import com.lzj.admin.query.RoleQuery;
import com.lzj.admin.pojo.Role;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 角色表 服务类
 * </p>
 *
 * @author lvyuanbo
 * @since 2021-08-10
 */
public interface IRoleService extends IService<Role> {

    /**
    * @Description: 添加|编辑用户列表的角色栏
    * @Author: lvyuanbo
    * @Date: 2021/8/13
    */
    List<Map<String, Object>> queryAllRoles(Integer userId) ;

    /** 
    * @Description: 查看权限列表
    * @Author: lvyuanbo
    * @Date: 2021/8/13
    */
    Map<String, Object> roleList(RoleQuery roleQuery);

    /**
    * @Description: 保存角色
    * @Author: lvyuanbo
    * @Date: 2021/8/13
    */
    void saveRole(Role role);
    /**
     * @Description: 更新角色
     * @Author: lvyuanbo
     * @Date: 2021/8/13
     */
    void updateRole(Role role);

    public Role findUserByUserName(String name);
    /** 
    * @Description: 删除角色
    * @Author: lvyuanbo
    * @Date: 2021/8/13
    */
    void deleteRole(Integer id);
    /**
     * 角色授权接口
     * @param roleId
     * @param mids
     * @return
     */
    void addGrant(Integer roleId, Integer[] mids);
}
